# Python os.path模块常见函数用法
from os import path
# 获取绝对路径
print(path.abspath("b.txt"))
# 获取共同前缀
print(path.commonprefix(["/home/yangjun/git/python_base/pb12_file_operation/a.txt", 
    "/home/yangjun/git/python_base/pb12_file_operation/b.txt"]))
# 获取共同路径
print(path.commonpath(["http://c.biancheng.net/python/", "http://c.biancheng.net/shell/"]))
# 获取目录
print(path.dirname("/home/yangjun/git/python_base/pb12_file_operation/b.txt"))
# 判断指定的目录是否存在
print(path.exists("a.txt"))
